﻿@section header
{
     <link rel="stylesheet" href="/css/treetable.css" />
    <link rel="stylesheet" href="/js/dtree/dtree.css" />
    <link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
}

<form class="layui-form" action="" id="formEdit">
    <div class="layui-row">
        <div class="layui-tab layui-tab-brief" lay-filter="tab" style="margin: 0px">
            <ul class="layui-tab-title">
                <li class="layui-this">基本信息</li>
                <li>执行人</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">

                    <div class="layui-form-item">
                        <label class="layui-form-label">节点标识</label>
                        <div class="layui-input-block">
                            <input type="text" name="NodeCode" id="NodeCode" v-model="tmp.NodeCode" required lay-verify="required"
                                   placeholder="流程编号" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">节点名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="NodeName" v-model="tmp.NodeName" required lay-verify="required"
                                   placeholder="节点名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">驳回类型</label>
                        <div class="layui-input-block">
                            <select id="NodeRejectType" lay-filter="NodeRejectType" name="NodeRejectType" v-model="tmp.NodeRejectType" required lay-verify="required">
                                <option value="0">上一步</option>
                                <option value="1">第一步</option>
                                <option value="2">指定步骤</option>
                                <option value="3">不处理</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item" v-if="isFork()">
                        <label class="layui-form-label">会签方式</label>
                        <div class="layui-input-block">
                            <select id="NodeConfluenceType" lay-filter="NodeConfluenceType" name="NodeConfluenceType" v-model="tmp.NodeConfluenceType">
                                <option value="all">全部分支都同意</option>
                                <option value="one">至少一个分支同意</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">三方系统回调URL</label>
                        <div class="layui-input-block">
                            <input type="text" name="ThirdPartyUrl" id="ThirdPartyUrl" v-model="tmp.ThirdPartyUrl" 
                                   placeholder="http://www.xxxxxx.com/api/workflow/execute_callback" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <input type="text" name="Description" v-model="tmp.Description" required lay-verify="required"
                                   placeholder="备注" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-row">
                        <div class="layui-input-block">
                            <input type="radio" name="NodeDesignate" v-model="tmp.NodeDesignate" lay-filter="NodeDesignate" value="ALL_USER" title="所有用户" checked>
                            <input type="radio" name="NodeDesignate" v-model="tmp.NodeDesignate" lay-filter="NodeDesignate" value="SPECIAL_USER" title="指定用户">
                            <input type="radio" name="NodeDesignate" v-model="tmp.NodeDesignate" lay-filter="NodeDesignate" value="SPECIAL_ROLE" title="指定角色">
                        </div>
                    </div>
                    <div class="layui-row">
                        <div v-if="tmp.NodeDesignate === 'SPECIAL_USER'">
                            <ul id="tree" class="ztree layui-nav-tree" style="float: left;border-right: 1px solid #eee;"></ul>
                            <ul id="userstree" class="ztree" style="margin-left: 220px; "></ul>
                        </div>
                        <div v-if="tmp.NodeDesignate === 'SPECIAL_ROLE'">
                            <div id="roles"></div>
                        </div>
                        <div v-if="tmp.NodeDesignate === 'ALL_USER'">
                            所有人都可以审核
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>

<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/userJs/nodeInfo.js?v2.0.0"></script>